
#ifndef __UFFS_EMU_H_
#define __UFFS_EMU_H_

#include "uffs/uffs_public.h"
#include "uffs/uffs_core.h"

#define MAX_MOUNT_TABLES		10
#define MAX_MOUNT_POINT_NAME	32

class UffsNandFlashManager
{
public:
    UffsNandFlashManager();
    ~UffsNandFlashManager();

    CARAPI Initialize();

    CARAPI Uninit();

    CARAPI Mount(
        /* [in] */ Int32 nStartBlock,
        /* [in] */ Int32 nEndBlock,
        /* [in] */ const char *mountPoint);

    CARAPI PrintMountStat();

    CARAPI Format(
        /* [in] */ WString devName);

    CARAPI GetCurrentDir(
        /* [out] */ WStringBuf *pwszCurDir);

    CARAPI SetCurrentDir(
        /* [in] */ WString wszCurDir);

    CARAPI constructor();

private:
    Int32              m_nIdx;
    uffs_mountTable    m_conf_mounts[MAX_MOUNT_TABLES];
    uffs_Device        m_conf_devices[MAX_MOUNT_TABLES];
    char               m_mount_point_name[MAX_MOUNT_TABLES][MAX_MOUNT_POINT_NAME];
};

#endif //__UFFS_DEV_H_
